import Vue from "vue";
import VueRouter from "vue-router";
Vue.use(VueRouter);

import discovery from "../views/Discovery.vue";
import songList from "../views/RecommendedSongList.vue";
import musics from "../views/LatestMusic.vue";
import mvs from "../views/LatestMV.vue";
import result from "../views/SearchResult.vue";
import musicList from "../views/MusicList.vue";
import mv from "../views/MV.vue";
import yq from "../views/YQ.vue";

const routes = [
  {
    path: "/yq",
    component: yq,
  },

  {
    path: "/",
    redirect: "/discovery",
  },
  {
    path: "/discovery",
    name: "发现音乐",
    component: discovery,
  },
  {
    path: "/songList",
    name: "推荐歌单",
    component: songList,
  },
  {
    path: "/songs",
    name: "最新音乐",
    component: musics,
  },
  {
    path: "/mvs",
    name: "最新MV",
    component: mvs,
  },
  {
    path: "/result",
    name: "搜索结果",
    component: result,
  },
  {
    path: "/musicList",
    name: "歌单列表",
    component: musicList,
  },
  {
    path: "/mv",
    name: "MV详情",
    component: mv,
  },
];

const router = new VueRouter({
  routes,
});

export default router;
